Fix window-point-context-set and window-point-context-use (bug#33871)
authorJuri Linkov <juri@linkov.net>
Tue, 9 Apr 2024 06:43:55 +0000 (09:43 +0300)
committerJuri Linkov <juri@linkov.net>
Tue, 9 Apr 2024 06:43:55 +0000 (09:43 +0300)
* lisp/window.el (window-point-context-set)
(window-point-context-use): Add 'window-buffer' for 'buffer-name'.

lisp/window.el

index 29e7310958b39abe4ffc074e3c41a118e86b2cec..cdc6f690bab015cefab54833a02e8387693dbd98 100644 (file)
@@ -10867,7 +10867,8 @@ Remember the returned context in the window parameter `context'."
                                         (window-buffer w)))
                 ((functionp fn))
                 (context (funcall fn w)))
-       (set-window-parameter w 'context (cons (buffer-name) context))))
+       (set-window-parameter
+        w 'context (cons (buffer-name (window-buffer w)) context))))
    'nomini))
 
 (defun window-point-context-use ()
@@ -10885,7 +10886,7 @@ found by the provided context."
                                         (window-buffer w)))
                 ((functionp fn))
                 (context (window-parameter w 'context))
-                ((equal (buffer-name) (car context))))
+                ((equal (buffer-name (window-buffer w)) (car context))))
        (funcall fn w (cdr context))
        (set-window-parameter w 'context nil)))
    'nomini))